//#[macro_use]
//extern crate lazy_static;
//#[macro_use]
//extern crate slog;
//extern crate slog_term;     //注意对应的crate名为 slog-term，坑爹
//extern crate slog_async;    //注意对应的crate名为 slog-async，同样坑爹

use super::*;

lazy_static! {
    static ref LOGGER : slog::Logger  = {
        let decorator = slog_term::TermDecorator::new().build();
        let drain = slog_term::FullFormat::new(decorator).build().fuse();
        let drain = slog_async::Async::new(drain).build().fuse();
        let _log = slog::Logger::root(drain, o!());
        _log
    };
}
type GlobalLog = slog::Logger;
pub fn logger<'a>() -> &'a GlobalLog {
    &LOGGER
}